import { NestFactory } from '@nestjs/core';
import { TestModule } from './test.module';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';

async function bootstrap() {
  const url = '0.0.0.0:4000'
  const app = await NestFactory.createMicroservice<MicroserviceOptions>(
    TestModule,
    {
      transport: Transport.GRPC,
      options: {
        url,
        package: "TEST",
        protoPath: "./proto/TestService.proto"
      }
    }
  )
  await app.listen();
}
bootstrap();
